#ifndef KBestParseForest3OTSibling_H
#define KBestParseForest3OTSibling_H
#include"KBestParseForest2OSibling.h"

class KBestParseForest3OTSibling : public KBestParseForest2OSibling{
protected:
	int getKey(int dir, int k);
	virtual int getKey(int s, int t, int dir, int comp, int k);
	ParseForestItem ****d_chart;
public:
	KBestParseForest3OTSibling(ParseForestItem ****d_chart, int start, int end, DependencyInstance &inst, int K);
	
	virtual ~KBestParseForest3OTSibling();

	bool add_d(int s, int type, int dir, double score);
	
	bool add_d(int s, int m, int t, int type, int dir, double score, ParseForestItem* p1, ParseForestItem* p2);
	
	double getProb_d(int s, int m, int t, int dir);
	
	double getProb_d(int s, int m, int t, int dir, int i);
	
	ParseForestItem getItem_d(int s, int m, int t, int dir);
	
	ParseForestItem getItem_d(int s, int m, int t, int dir, int k);
	
	ParseForestItem* getItems_d(int s, int m, int t, int dir);

	virtual vector<pair<FeatureVector*, string*> >* getBestParses(DependencyInstance *inst, DependencyPipe *pipe);

	virtual vector<pair<FeatureVector*, string*> >* getBestParses(DependencyInstance *inst, DependencyPipe *pipe, vector<vector<vector<double> > > &probs,
		vector<vector<vector<double> > > &probs_trips, vector<vector<vector<double> > > &probs_sibs, vector<vector<vector<vector<double> > > > &probs_ttrips, 
		vector<vector<vector<vector<double> > > > &probs_tsibs, vector<vector<vector<vector<double> > > > &nt_probs, bool labeled);

	virtual string* getDepString(ParseForestItem &pfi);
};
#endif
